//
//  CollectionExt.swift
//  test-ios
//
//  Created by wyz5204 on 2023/6/6.
//

import Foundation


/// 处理数组越界
extension Collection {
    subscript (safe index: Index) -> Element? {
        return indices.contains(index) ? self[index] : nil
    }
}
